Question: In convex quadrilateral $ABCD$, $\angle A = \angle C$, $AB=CD=180$, and $AD \ne BC$.  The perimeter of $ABCD$ is 640. Find $\cos A$.
Explanation: Let $\angle A = \angle C = \alpha$, $AD=x$, and $BC=y$.  Apply the Law of Cosines in triangles $ABD$ and $CDB$ to obtain $$BD^2=x^2+180^2-2\cdot180x\cos\alpha =y^2+180^2-2\cdot180
y\cos\alpha.$$Because $x\ne y$, this yields $$\cos\alpha={{x^2-y^2}\over{2\cdot180(x-y)}} ={{x+y}\over360} =
{280\over360}=\boxed{\frac{7}{9}}.$$[asy]
pair A,B,C,D;
A=(0,0);
B=(10,0);
C=(16,4);
D=(8,6);
draw(A--B--C--D--cycle,linewidth(0.7));
draw(B--D,linewidth(0.7));

label("{\small $A$}",A,SW);
label("{\small $B$}",B,S);
label("{\small $C$}",C,E);
label("{\small $D$}",D,N);
label("{\small $\alpha$}",(1.5,-0.2),N);
label("{\small $\alpha$}",(15.2,3.8),W);
label("{\small 180}",(5,0),S);
label("{\small 180}",(12,5),NE);
label("$x$", (A + D)/2, NW);
label("$y$", (B + C)/2, SE);
[/asy]